home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / tutor / physic4.exe / MATHCHIP.TXT
Text File  |  1992-10-30  |  7KB  |  130 lines

  1.  
  2.      October 30, 1992
  3.  
  4.      I just bought and installed a math coprocessor in my computer. I have
  5.      several programs that benefit greatly from this upgrade. I have an
  6.      80386 DX / 33 Mhz computer. I chose a Cyrix 83D87 math chip. It is
  7.      basically a clone of the Intel 80387 with a lower price tag. The Intel
  8.      chip goes for about $180.00 by mail order usually, while the Cyrix can
  9.      be mail-ordered for about $135.00. Tomorrow the prices may be even
  10.      lower. In my case, the firm that I bought my computer from offers
  11.      upgrades to their customers at even lower prices. I paid $116.00.
  12.  
  13.      A math chip does what is called "floating point math". Here's what that
  14.      means: Consider only whole numbers. If you add whole numbers, the sum
  15.      is a whole number. If you multiply or subtract whole numbers, the
  16.      result is always whole numbers. But if you divide 2 whole numbers, the
  17.      result may or may not be a whole number. The result may be a decimal
  18.      number. Division of whole numbers goes by a name in the math world
  19.      called `rational expression'. (In this paper I am using the term "whole
  20.      number" very loosely, it can include zero or negatives for my purposes
  21.      here. The type of whole numbers I mean can also be called integers).
  22.      Well, decimal numbers is what in the computer world is called floating
  23.      point math. In a computer without a math chip, decimal numbers are
  24.      handled by the CPU. (In my case, it would be handled by the 80386). But
  25.      it can be a tough, time-consuming process, in comparison to whole
  26.      number types of operations. There are 2 types of decimal numbers, one
  27.      eventually results in a repeating pattern, as in 2.000000000 or
  28.      2143333333333...etc (which is 643 divided by 300, the 3s never end).
  29.      Another might be 3.143789789789...etc, the 789s never end. The other
  30.      type has a non-repeating pattern, as in 1.2345678910 or 3.1415926535.
  31.      The repeaters are called rational numbers. The non-repeaters are called
  32.      irrational numbers. Here is how we know which is which: Division of
  33.      whole numbers results in rational answers. Division involving any
  34.      decimal numbers results in irrational answers.
  35.  
  36.      In the ideal case, a math chip would always take over all decimal
  37.      operations. This would make for essentially 8 different kinds of math:
  38.      addition, subtraction, multiplication, and division of whole numbers,
  39.      and the same 4 operations involving any decimal numbers. The 8th is
  40.      called irrational math, also involving decimals (non-repeating decimal
  41.      patterns, that are gotten by dividing any decimals). The math chip
  42.      would then take over 5 of those 8 operations, since 5 of them are
  43.      floating point operations, allowing the CPU to do other stuff eight-
  44.      fifths of the time. Eight-fifths = 1.6, so then the computer would run
  45.      exactly 60% faster.
  46.  
  47.      But alas, it isn't quite that simple. Software must be specifically
  48.      written to use the math chip. If it isn't, the chip remains idle. There
  49.      are 2 different kinds of such softwares: The kind that requires a math
  50.      chip to even run, and the kind that doesn't require it but uses a math
  51.      chip if it is there. I have several of the latter kind, including EZ
  52.      Cosmos (an astronomy program), Mercury (a math program), etc. EZ Cosmos
  53.      runs 5 times faster than it used to, and Mercury runs 5.5 times faster
  54.      than it used to. Many softwares don't use a math chip at all. I also
  55.      have other math-chip-aware programs. One must read the fine print.
  56.  
  57.      Do not ever install a TSR math chip emulator. The only purpose of these
  58.      is to allow the running of programs that require a math coprocessor to
  59.      even run. If it works, you are running a huge risk of the program
  60.      crashing at an inconvenient time, resulting in lost data. Secondly,
  61.      many programmers know how to write software to tell the difference
  62.      between an emulator, and the real chip. If this programmer(s) happens
  63.      to be buddy-buddy with a math chip manufacturer, then he/she might
  64.      write their program to refuse to run if only an emulator is present.
  65.      Furthermore, for the kind of program that runs without a math chip, but
  66.      runs much faster with one, it won't run a smidgen faster if only an
  67.      emulator is present. Typically an author of an emulator wants anywhere
  68.      from $5.00 to $55.00 for their software emulator. Some will admit the
  69.      limitations and risks of their programs, while others won't. You are
  70.      much better off investing in the real chip for $116.00 to $180.00.
  71.  
  72.      To change the subject, I will address the proof that division by zero
  73.      is not defined.
  74.  
  75.                   8
  76.      If you say  --- = 2, you can check it by multiplying the result of 2
  77.                   4       times the denominator of 4, and 2 x 4 = 8, the
  78.                           numerator.
  79.  
  80.                   0
  81.      If you say  --- = 0, you can check it by multiplying the result of 0
  82.                   4       times the denominator of 4, and 0 x 4 = 0, the
  83.                           numerator.
  84.  
  85.                   4
  86.      However,    --- = what, because   what x 0 = 4?   This is undefined.
  87.                   0
  88.  
  89.  
  90.                   0
  91.      If you say  --- = 0, guess what, that's wrong! The zero denominator may
  92.                   0       as well be ANY number, since:   0 x Anything = 0.
  93.  
  94.  
  95.  
  96.      Zero in the denominator is never defined. If you are doing a long,
  97.      complicated algebra problem, and somewhere along the line you end with
  98.      a zero denominator, then either
  99.  
  100.      1) You made a mistake somewhere along the line.
  101.      2) The problem is trying to tell you it can't be solved.
  102.  
  103.      If 2, then
  104.  
  105.      A) Possibly useful; you have a vertical slope on your Cartesian graph.
  106.      B) Possibly useful; since you realize that you aren't working with a
  107.         function in this part of the problem.
  108.      C) Give up and try to think of something happy.
  109.  
  110.      If you are using a math program, and for whatever reason a division by
  111.      zero is attempted, one of three things will happen:
  112.  
  113.      1) The program recognizes the offense, notifies you, and gives you
  114.         a chance to correct things. So far this is a quality program.
  115.      2) The program recognizes the offense, and returns control of the
  116.         computer to the operating system. Annoying. Possible lost data.
  117.      3) The program does not recognize the error, and the computer "hangs",
  118.         and all you can hope to do is power down and re-boot. Infuriating.
  119.         Possible lost data. Try to think of something happy.
  120.  
  121.      Actually, it takes under 10 lines of text source code for a programmer
  122.      to test for a zero denominator, if it's found then put a message on the
  123.      screen, abort the division before it's attempted, and return control
  124.      within the program to the request for input. Except for beginning
  125.      programmers, there's hardly an excuse to not program the computer this
  126.      way. In 2 and 3 this was left out, and it is up to the compiler (a
  127.      small part of every program) to either return to the operating system,
  128.      or to freak out and hang the computer (cheap compiler). Borland's Turbo
  129.      Pascal compiler simply jumps to the operating system.
  130.